package com.lagou.task10;

public class Manager extends People{

    private double bonus;

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        if (bonus > 0) {
            this.bonus = bonus;
        } else {
            System.out.println("奖金不合理哦！");
        }
    }

    public Manager() {
        super();   //表示调用父类无参构造
    }
     public Manager(String name, int id, int salary,double bonus) {
        super(name,id,salary);  //表示调用父类有参构造
     }

    @Override
    public void show() {
        super.show();
        System.out.println("奖金：" + bonus);
    }

    @Override
    public void work() {
        super.work();
        System.out.println("是一位项目经理，你看他正在管理工作,分配任务,检查员工提交上来的代码.....");
    }
}
